package com.coderdream.chapter11.composite.sample;

public abstract class Entry {

	public Entry add(Entry entry) throws FileTreatmentException {
		throw new FileTreatmentException();
	}
	
	public void printList() {
		this.printList("");
	}
	
	// 在前面加上 prefix 后輸出總覽
	protected abstract void printList(String prefix);

	// 字符串輸出格式
	public String toString() {
		return this.getName() + " (" + this.getSize() + ")";
	}

	public abstract int getSize();

	public abstract String getName();
}
